<template>
	<view class="">
		<w-navbar :title="navbar_tile" titleColor="black" backgroundColor="white"></w-navbar>
		<w-container>
			<template>
				<view class="container">
					<rich-text :nodes="content"></rich-text>
				</view>
			</template>
		</w-container>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				navbar_tile:'',
				content:'',
				diyname:'',
			}
		},
		onLoad(options) {
			this.diyname = options.diyname
			this.get_agreement_info()
		},
		onShow() {
		},
		methods:{
			async get_agreement_info() {
				const res = await this.$http({
					url: '/addons/shop/api.common/get_agreement_info',
					data: {
						diyname:this.diyname ||'aboutus'
					}
				})
				if(res.code == 1){
					this.navbar_tile = res.data.agreement_info.title
					this.content = res.data.agreement_info.content
				}else{
					uni.showToast({
						title:res.msg,
						icon:'none'
					})
				}
			},
			
		}
	}
</script>

<style lang="scss">
	.container{
		height: 100%;
		width: 100%;
		box-sizing: border-box;
		position: relative;
	}
	
</style>